

export const count = (state = 100, action) => {
  const { type, payload } = action

  switch (type) {
    case "countAdd":
      state++
      return state
      break;

    case "countDesc":
      state -= payload
      return state
      break;

    case "changeCount":
      return state + payload
      break;

    default:
      return state
      break;
  }
}
